package com.sample.thread.join;
/**
* @comments
* @author  zg
* @date 2021年3月12日
*/
public class JoinThread extends Thread {

	private String threadName;

	private int executeTime;
	
	public JoinThread(String threadName, int executeTime) {
		this.threadName = threadName;
		this.executeTime = executeTime;
	}
	
	@Override
	public void run() {
		System.out.println("【"+threadName+"】执行...");
        try {
            Thread.sleep(this.executeTime * 1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("【"+threadName+"】执行完毕");

	}
	
	
}
